//引入样式
require('../../assets/css/normalize.css')
require('../../assets/css/reset.css')
require('./sports_course_detail.less');

//引入模块
const axios = require('../../utils/axios.js');

document.addEventListener('DOMContentLoaded', function () {
    //1. 获取地址栏传递的参数id
    let id = location.search.split('=').pop();

    axios.get('/api/train/courseDetail?id=' + id).then(res => {
        console.log(res);

        //将视频数据存储到localStorage中
        let data = res.data.data.fragments;
        localStorage.setItem('fragments', JSON.stringify(data));
    });
});